<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>http::request_serializer</title>
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../index.html" title="Chapter 1. Boost.Beast">
<link rel="up" href="../ref.html" title="This Page Intentionally Left Blank 2/2">
<link rel="prev" href="boost__beast__http__string_body.html" title="http::string_body">
<link rel="next" href="boost__beast__http__response_serializer.html" title="http::response_serializer">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="boost__beast__http__string_body.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../ref.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="boost__beast__http__response_serializer.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="beast.ref.boost__beast__http__request_serializer"></a><a class="link" href="boost__beast__http__request_serializer.html" title="http::request_serializer">http::request_serializer</a>
</h4></div></div></div>
<p>
        <a class="indexterm" name="idm44861247972736"></a>
      </p>
<p>
        A serializer for HTTP/1 requests.
      </p>
<h5>
<a name="beast.ref.boost__beast__http__request_serializer.h0"></a>
        <span class="phrase"><a name="beast.ref.boost__beast__http__request_serializer.synopsis"></a></span><a class="link" href="boost__beast__http__request_serializer.html#beast.ref.boost__beast__http__request_serializer.synopsis">Synopsis</a>
      </h5>
<p>
        Defined in header <code class="literal">&lt;<a href="../../../../../../boost/beast/http/serializer.hpp" target="_top">boost/beast/http/serializer.hpp</a>&gt;</code>
      </p>
<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span>
    <span class="keyword">class</span> <a class="link" href="../concepts/Body.html" title="Body"><span class="emphasis"><em>Body</em></span></a><span class="special">,</span>
    <span class="keyword">class</span> <a class="link" href="../concepts/Fields.html" title="Fields"><span class="emphasis"><em>Fields</em></span></a> <span class="special">=</span> <span class="identifier">fields</span><span class="special">&gt;</span>
<span class="keyword">using</span> <span class="identifier">request_serializer</span> <span class="special">=</span> <span class="identifier">serializer</span><span class="special">&lt;</span> <span class="keyword">true</span><span class="special">,</span> <span class="identifier">Body</span><span class="special">,</span> <span class="identifier">Fields</span> <span class="special">&gt;;</span>
</pre>
<h5>
<a name="beast.ref.boost__beast__http__request_serializer.h1"></a>
        <span class="phrase"><a name="beast.ref.boost__beast__http__request_serializer.types"></a></span><a class="link" href="boost__beast__http__request_serializer.html#beast.ref.boost__beast__http__request_serializer.types">Types</a>
      </h5>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr>
<th>
                <p>
                  Name
                </p>
              </th>
<th>
                <p>
                  Description
                </p>
              </th>
</tr></thead>
<tbody><tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__http__serializer/value_type.html" title="http::serializer::value_type">value_type</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  The type of message this serializer uses.
                </p>
              </td>
</tr></tbody>
</table></div>
<h5>
<a name="beast.ref.boost__beast__http__request_serializer.h2"></a>
        <span class="phrase"><a name="beast.ref.boost__beast__http__request_serializer.member_functions"></a></span><a class="link" href="boost__beast__http__request_serializer.html#beast.ref.boost__beast__http__request_serializer.member_functions">Member
        Functions</a>
      </h5>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr>
<th>
                <p>
                  Name
                </p>
              </th>
<th>
                <p>
                  Description
                </p>
              </th>
</tr></thead>
<tbody>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__http__serializer/consume.html" title="http::serializer::consume">consume</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  Consume buffer octets in the serialization.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__http__serializer/get.html" title="http::serializer::get">get</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  Returns the message being serialized.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__http__serializer/is_done.html" title="http::serializer::is_done">is_done</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  Return <code class="computeroutput"><span class="keyword">true</span></code> if serialization
                  is complete.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__http__serializer/is_header_done.html" title="http::serializer::is_header_done">is_header_done</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  Return <code class="computeroutput"><span class="keyword">true</span></code> if serialization
                  of the header is complete.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__http__serializer/limit.html" title="http::serializer::limit">limit</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  Returns the serialized buffer size limit. <br> <span class="silver">—</span><br>
                  Set the serialized buffer size limit.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__http__serializer/next.html" title="http::serializer::next">next</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  Returns the next set of buffers in the serialization.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__http__serializer/operator_eq_.html" title="http::serializer::operator=">operator=</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  Assignment.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__http__serializer/serializer.html" title="http::serializer::serializer">serializer</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  Constructor.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__http__serializer/split.html" title="http::serializer::split">split</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  Returns <code class="computeroutput"><span class="keyword">true</span></code> if we
                  will pause after writing the complete header. <br> <span class="silver">—</span><br>
                  Set whether the header and body are written separately.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__http__serializer/writer_impl.html" title="http::serializer::writer_impl">writer_impl</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  Provides low-level access to the associated <span class="emphasis"><em>BodyWriter</em></span>
                </p>
              </td>
</tr>
</tbody>
</table></div>
<p>
        An object of this type is used to serialize a complete HTTP message into
        a sequence of octets. To use this class, construct an instance with the message
        to be serialized. The implementation will automatically perform chunk encoding
        if the contents of the message indicate that chunk encoding is required.
        Chunked output produced by the serializer never contains chunk extensions
        or trailers, and the location of chunk boundaries is not specified. If callers
        require chunk extensions, trailers, or control over the exact contents of
        each chunk they should use the serializer to write just the message header,
        and then assume control over serializing the chunked payload by using the
        chunk buffer sequence types <a class="link" href="boost__beast__http__chunk_body.html" title="http::chunk_body"><code class="computeroutput"><span class="identifier">chunk_body</span></code></a>, <a class="link" href="boost__beast__http__chunk_crlf.html" title="http::chunk_crlf"><code class="computeroutput"><span class="identifier">chunk_crlf</span></code></a>, <a class="link" href="boost__beast__http__chunk_header.html" title="http::chunk_header"><code class="computeroutput"><span class="identifier">chunk_header</span></code></a>, and <a class="link" href="boost__beast__http__chunk_last.html" title="http::chunk_last"><code class="computeroutput"><span class="identifier">chunk_last</span></code></a>.
      </p>
<h5>
<a name="beast.ref.boost__beast__http__request_serializer.h3"></a>
        <span class="phrase"><a name="beast.ref.boost__beast__http__request_serializer.template_parameters"></a></span><a class="link" href="boost__beast__http__request_serializer.html#beast.ref.boost__beast__http__request_serializer.template_parameters">Template
        Parameters</a>
      </h5>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr>
<th>
                <p>
                  Type
                </p>
              </th>
<th>
                <p>
                  Description
                </p>
              </th>
</tr></thead>
<tbody>
<tr>
<td>
                <p>
                  <code class="computeroutput"><span class="identifier">isRequest</span></code>
                </p>
              </td>
<td>
                <p>
                  <code class="computeroutput"><span class="keyword">true</span></code> if the message
                  is a request.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <code class="computeroutput"><span class="identifier">Body</span></code>
                </p>
              </td>
<td>
                <p>
                  The body type of the message.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <code class="computeroutput"><span class="identifier">Fields</span></code>
                </p>
              </td>
<td>
                <p>
                  The type of fields in the message.
                </p>
              </td>
</tr>
</tbody>
</table></div>
<h5>
<a name="beast.ref.boost__beast__http__request_serializer.h4"></a>
        <span class="phrase"><a name="beast.ref.boost__beast__http__request_serializer.description"></a></span><a class="link" href="boost__beast__http__request_serializer.html#beast.ref.boost__beast__http__request_serializer.description">Description</a>
      </h5>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2016-2019 Vinnie
      Falco<p>
        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
      </p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="boost__beast__http__string_body.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../ref.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="boost__beast__http__response_serializer.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
